<!-- Oceny czastkowe -->
<script type="text/javascript">
{literal}
function toggleStatus(obj, urlValue) {
	$(obj).attr('disabled', 'disabled');
	$.ajax({
		url: urlValue ,
		type:'GET',
		success: function(){
			$(obj).removeAttr('disabled');
		}
	});
}
{/literal}
</script>
<h1>Rangi użytkowników:  </h1>		
<form method="post" action="{url userActivityBadges=Group}">
{mainoptions title=Lista}
<table cellspacing="0" cellpadding="0" border="0">
	<tr>
		<th>Lp.</th>
		<th>Ranga</th>
		<th>Punkty</th>
		<th>Aktywność</th>
		<th class="noSort">
			<a href="{url UserActivityBadges=Edit id=$arrData.id}" class="add">Dodaj</a>

		</th>
	</tr>
	
	{foreach from=$arrData item=obj}
	<tr>
		<td>{tables type='lp' tid='vote_table' iteration=$smarty.foreach.list.iteration}<br />[{$obj->getId()}]</td>
		<td>{$obj->getBadge()}<br />
		{if strlen($obj->getGroup()) gt 0}
			<a href="{url userActivityBadges=Ungroup id=$obj->getId()}" onclick="if(!confirm('Czy na pewno chcesz usunąć element z grupy?'))return false;" class="deleteNoAlert">{$obj->getGroup()}</a>
		{else}
			<input type="checkbox" name="group[]" value="{$obj->getId()}" id="badge_{$obj->getId()}" /><label for="badge_{$obj->getId()}"><small>grupuj</small></label>
		{/if}
		</td>
		<td>{$obj->getPoints()}</td>
		<td>{$obj->dictActions->getDescription()}</td>
		<td>	
			<a href="{url UserActivityBadges=Edit id=$obj->getId()}" class="edit">edytuj</a>

			<a onclick="if(!confirm('Czy na pewno chcesz usunąć ten element?'))return false;" href="{url UserActivityBadges=Delete id=$obj->getId()}" class="delete">usuń</a>
		</td>
	</tr>
	{/foreach}

</table>

{/mainoptions}
	
{mainoptions}
<p align="right">
	<label>nazwa grupy: </label><input style="width: 150px;" size="20" type="text" name="groupName" /><input type="submit" value="Grupuj zaznaczone" />
</p>
{/mainoptions}


</form>